package com.wanczy.service.impl;

import java.util.List;

import com.wanczy.dao.factory.UserTableDAOFactory;
import com.wanczy.pojo.UserTable;
import com.wanczy.service.UserLoginService;

public class UserLoginServiceImpl implements UserLoginService{

	public UserTable login(String userAccount, String userPass) {
		return UserTableDAOFactory.getUserTableDAOInstence().findByUserAccountUserPass(userAccount, userPass);
	}

	@Override
	public List<UserTable> findByUserAccountAndState(String userAccount, int userState, int pageSize, int pageCurrent) {
		
		return UserTableDAOFactory.getUserTableDAOInstence().findByUserAccountAndState(userAccount, userState, pageSize, pageCurrent);
	}

	@Override
	public int findConutByUserAccountAndState(String userAccount, int userState) {
		
		return UserTableDAOFactory.getUserTableDAOInstence().findConutByUserAccountAndState(userAccount, userState);
	}
	@Override
	public boolean doIns(UserTable userTable) {		
		return UserTableDAOFactory.getUserTableDAOInstence().doIns(userTable);
	}
	@Override
	public boolean doDel(int userId) {		
		return UserTableDAOFactory.getUserTableDAOInstence().doDel(userId);
	}

	@Override
	public UserTable findById(int userId) {
		
		return UserTableDAOFactory.getUserTableDAOInstence().findById(userId);
	}

	@Override
	public boolean doUpd(UserTable userTable) {
		
		return UserTableDAOFactory.getUserTableDAOInstence().doUpd(userTable);
	}
	
}
